package com.yfp.device.mapper;

import com.yfp.device.domain.MachineError;
import com.yfp.device.domain.MachineErrorExample;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface MachineErrorMapper {
    long countByExample(MachineErrorExample example);

    int deleteByExample(MachineErrorExample example);

    int insert(MachineError record);

    int insertSelective(MachineError record);

    List<MachineError> selectByExample(MachineErrorExample example);

    int updateByExampleSelective(@Param("record") MachineError record, @Param("example") MachineErrorExample example);

    int updateByExample(@Param("record") MachineError record, @Param("example") MachineErrorExample example);

    /**
     * 修复故障
     *
     * @param machineSn  机器编号
     * @param errCode    故障代码
     * @param repairTime 修复时间
     * @return 更新数
     */
    int updateByMachineSnAndErrCode(@Param("machineSn") String machineSn, @Param("errCode") String errCode, @Param("repairTime") String repairTime);
}